﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProjectDirector.ViewModels.EmployeeViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <table width="100%" 
        style="border-bottom-style: solid; border-bottom-width: 1px; border-bottom-color: #CCCCCC">
        <tr>
            <td width="55px">
                <img src="../../Content/Images/bigimgs/397.png" width="50px" height="50px" />
            </td>
            <td>
            <span style="font-size:14px; font-weight:bold;">
                Personal Details for:
                    <%: Model.Employee.FirstName %>
                    <%: Model.Employee.LastName %>  
                    </span>              
            </td>
            <td align="right" valign="bottom">              
                    <% Html.BeginForm("Delete", "Employee", FormMethod.Post); %>
                    <%: Html.HiddenFor(m=>m.Employee.UserId) %>
                    <input type="submit" value="Delete Employee" class="Button" onclick="return confirm('Do you really want to delete this employee?');" />
                    <% Html.EndForm(); %>                           
            </td>
        </tr>
    </table>    
    <table>
        <tr>
            <td>
                <u>Employee Details</u>
            </td>
            <td>            
            </td>
        </tr>
        <tr>
            <td>
                Title:
            </td>
            <td>
                <%: Model.Employee.Title.TitleName %>
            </td>
        </tr>
        <tr>
            <td>
                Name:
            </td>
            <td>
                <%: Model.Employee.FirstName %>
                <%: Model.Employee.LastName %>
            </td>
        </tr>
        <tr>
            <td>
                Job Title:
            </td>
            <td>
                <%: Model.Employee.JobTitle.JobTitleName %>
            </td>
        </tr>
        <tr>
            <td>
                Start Date:
            </td>
            <td>
                <%: Model.Employee.StartDate.ToShortDateString()%>
            </td>
        </tr>
        <tr>
            <td>
                Contract Type:
            </td>
            <td>
                <%: Model.Employee.ContractType.ContractTypeName %>
            </td>
        </tr>
        <tr>
            <td>
                Date Created:
            </td>
            <td>
                <%: Model.Employee.DateCreated %>
            </td>
        </tr>
        <tr>
            <td>
                Work Phone number:
            </td>
            <td>
                <%: Model.Employee.WorkPhone %>
            </td>
        </tr>
        <tr>
            <td>
                Work Email address:
            </td>
            <td>
                <%: Model.Employee.WorkEmail %>
            </td>
        </tr>
        <tr>
            <td>
                Mobile Phone number:
            </td>
            <td>
                <%: Model.Employee.MobilePhone %>
            </td>
        </tr>
        <tr>
            <td>
                Private Email address:
            </td>
            <td>
                <%: Model.Employee.PrivateEmail %>
            </td>
        </tr>
        <tr>
            <td>
                <u>Address Details</u>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>
                House name/House number:
            </td>
            <td>
                <%: Model.Address.Address1 %>
            </td>
        </tr>
        <tr>
            <td>
                Street:
            </td>
            <td>
                <%: Model.Address.Address2 %>
            </td>
        </tr>
        <tr>
            <td>
                Town:
            </td>
            <td>
                <%: Model.Address.Town %>
            </td>
        </tr>
        <tr>
            <td>
                Postal Code:
            </td>
            <td>
                <%: Model.Address.PostalCode%>
            </td>
        </tr>
        <tr>
            <td>
                Country:
            </td>
            <td>
                <%: Model.Address.Country.CountryName%>
            </td>
        </tr>
    </table>    
      <p>
        <%: Html.ActionLink("Edit Employee Details", "Edit", new { id=Model.Employee.UserId }) %>
        |
        <%: Html.ActionLink("Edit Address Details", "EditAddress", new { id=Model.Employee.AddressId }) %>
        |
        <%: Html.ActionLink("Back to List", "List") %>
    </p>
    
</asp:Content>
